package com.example.serverdemo.common;

import cn.hutool.core.convert.Convert;

public class Constant {

    public static final String DEVICE_HANDLER = "DeviceHandler";
    public static final int PACKAGE_SIZE = 1024 * 2;
    public static final int JKC_810 = 0x01;
    public static final int JKC_910 = 0x02;
    public static final int COMMUNICATION_TIMEOUT_COUNT = 20000;
    public static final String DEVICE_ONLINE_STATUS_FLAG = "OnlineDevice";
    public static final String PROGRESS = "Progress_";
    public static final byte FLAG1 = Convert.intToByte(0xAA);
    public static final byte FLAG2 = Convert.intToByte(0xBB);
    public static final byte SERVER_ADDRESS = Convert.intToByte(0x00);
    public static final byte MARK1 = Convert.intToByte(0x01);//001
    public static final byte MARK2 = Convert.intToByte(0x05);//101
    public static final byte MARK3 = Convert.intToByte(0x02);//010
    public static final byte MARK4 = Convert.intToByte(0x06);//110
    public static final byte DEFAULT_CRC_PLACEHOLDER = Convert.intToByte(0x00);
    public static class ClientCommand{
        public static final byte COMMAND_SUCCESS = Convert.intToByte(0x01);
        public static final byte COMMAND_FAILED = Convert.intToByte(0x00);
        public static final int UNBIND_DEVICE = 0;
        public static final int BIND_DEVICE = 1;
        public static final int CHANGE_BIND_DEVICE = 2;
        public static final int GET_ONLINE_DEVICES = 3;
        public static final int CLIENT_SET_SESSION_ID = 4;
    }
}
